import Vue from 'vue'

Vue.prototype.$goBack = () => {
    const pageArr = getCurrentPages()
    if (pageArr.length > 1) {
        uni.navigateBack()
    } else {
        history.back()
    }
}
